<div class="featured article">
<h3>Paths everywhere</h3>

<ul>
<li>starting with paths, a path is a sequence of nodes and relationships from a start node to an end nod</li>
<li>we know that Trinity loves Neo, but how many paths exist between their actors; we limit the path length and the query as it exhaustively searches the graph otherwise
<br/><pre>MATCH (neo:Actor {name:"Keanu Reeves"}),
(trinity:Actor {name:"Carrie-Anne Moss"})
MATCH p = (neo)-[:ACTS_IN*0..5]-(trinity)
RETURN p, length(p) 
LIMIT 10;</pre></li>
<li>if that's a lot of data, we just want to look at the names and titles of the nods of this path
<br/><pre>MATCH (neo:Actor {name:"Keanu Reeves"}),
(trinity:Actor {name:"Carrie-Anne Moss"})
MATCH p = (neo)-[:ACTS_IN*0..5]-(trinity)
RETURN extract(n in nodes(p) |
coalesce(n.title,n.name)) as `names and titles`,
length(p) 
ORDER BY length(p) LIMIT 10 ;</pre></li>
<!--li>let's explore connections between more people, we choose some other actor
<pre>START m=<%=tutorial.matrix%>,other=<%=tutorial.morpheus%>  
MATCH m<-[:ACTS_IN]-actor,p
RETURN colleague.name,count(<em>) order by count(</em>) desc limit 10;</pre>
</li-->
</ul>
</div>